#include <limits.h>
#include <stdio.h>
#include <string.h>
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) > (B) ? (B) : (A))

void changeStr(char *str, char *min, char *max) {
  unsigned long n = strlen(str);
  *min = CHAR_MAX;
  *max = CHAR_MIN;
  for (int i = 0; i < n; i++) {
    if (str[i] >= 'a' && str[i] <= 'z')
      str[i] = str[i] - 'a' + 'A';
    else if (str[i] >= 'A' && str[i] <= 'Z')
      str[i] = str[i] + 'a' - 'A';
    *min = MIN(str[i], *min);
    *max = MAX(str[i], *max);
  }
}
int main() {
  char str[] = "Hello World";
  char min, max;
  changeStr(str, &min, &max);
  printf("%s\t%c\t%c\n", str, min, max);
  return 0;
}
